package org.btik.light.meta.base.report;

import org.btik.light.meta.base.Report;

/**
 * @author lustre
 * @version 1.0
 * date 2021/5/15 12:37
 * 字符串报文，不属于light的实现
 */
public class SimpleReport implements Report {
    private String msg;
    private final String sn;

    public SimpleReport(String sn, String msg) {
        this.msg = msg;
        this.sn = sn;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    @Override
    public int getCmdId() {
        return -1;
    }


    @Override
    public int getMsgType() {
        return 0;
    }

    @Override
    public String getDev() {
        return sn;
    }

    @Override
    public int getReturnCode() {
        return 0;
    }

    @Override
    public String getReturnMsg() {
        return msg;
    }

    @Override
    public String toString() {
        return "SimpleReport{" +
                "msg='" + msg + '\'' +
                ", sn='" + sn + '\'' +
                '}';
    }
}
